﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

namespace Motoball.screenmanager
{
    /// <summary>
    /// class for all splash-screens like background, credits,
    /// instructions, winning and so on
    /// </summary>
    public class SplashScreen : GameScreen
    {
        //background drawn above any lower layers
        public Texture2D background;
        //value by default: half-transparent white
        public Color backgroundColor;

        public SplashScreen(string screenName) :
            base(screenName)
        {
            backgroundColor = new Color(0.8f, 0.8f, 0.8f);
            backgroundColor.A = (byte)100.0f;
        }

        #region Methods
        public override void Update(GameTime gameTime)
        {
            if (screenManager.Input.MenuButtonPressed != 0)
                //memo:look if reacts as should
                Exit();
        }

        public override void Draw(GameTime gameTime)
        {
            //SpriteBatch.Begin();
            ////memo:debug background
            //SpriteBatch.Draw(background, new Rectangle(0, 0, screenManager.Game.Window.ClientBounds.Width, screenManager.Game.Window.ClientBounds.Height), null, backgroundColor);
            //SpriteBatch.End();
        }

        public override void LoadContent()
        {
            background = screenManager.Content.Load<Texture2D>("Images\\blank");
            
        }
      
        
        #endregion

        #region Properties
        public Texture2D Background
        {
            get { return background; }
            set { background = value; }
        }
        #endregion
    }
}
